package com.canlihao.ui.utils.bannerUtil;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.bigkoo.convenientbanner.holder.Holder;
import com.canlihao.ui.R;
import com.canlihao.ui.utils.glide.GlideConfig;
import com.canlihao.ui.utils.glide.GlideLoadUtil;

/**
 * Created by Sai on 15/8/4.
 * 本地图片Holder例子
 */
public class NetGlidHolderView extends Holder<String> {
    private ImageView imageView;
    Context context;
    public NetGlidHolderView(View itemView,Context context) {
        super(itemView);
        this.context = context;
    }

    @Override
    protected void initView(View itemView) {
        imageView =itemView.findViewById(R.id.ivPost);
    }

    @Override
    public void updateUI(String data) {
        GlideLoadUtil.getLoadUtil().loadImage(context, GlideConfig.builder().img(imageView)
                .url(data).cachs(false).buider());
    }
}
